package com.vietnam.power.persitence;

import java.io.Serializable;

import javax.persistence.*;

import com.vietnam.power.domain.Root;

import java.util.Date;


/**
 * The persistent class for the password_history database table.
 * 
 */
@Entity
@Table(name="password_history")
public class PasswordHistory implements Serializable, Root {
	private static final long serialVersionUID = 1L;
	private int id;
	private Date createdDate;
	private String password;
	private UserInfo userInfo1;
	private UserInfo userInfo;

	public PasswordHistory() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}


	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="created_date")
	public Date getCreatedDate() {
		return this.createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}


	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}


	//bi-directional many-to-one association to UserInfo
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="user_info_id")
	public UserInfo getUserInfo1() {
		return this.userInfo1;
	}

	public void setUserInfo1(UserInfo userInfo1) {
		this.userInfo1 = userInfo1;
	}


	//bi-directional many-to-one association to UserInfo
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="created_by")
	public UserInfo getUserInfo() {
		return this.userInfo;
	}

	public void setUserInfo(UserInfo userInfo2) {
		this.userInfo = userInfo2;
	}

}